
class OrderModel {

  int? id;
  String? orderSn;
  String? paymentSn;
  String? unionOrderSn;
  int? shopId;
  String? shopName;
  int? orderStatus;
  String? orderStatusDesc;
  int? actualAmount;
  String? cancelTime;
  String? userRemark;
  String? createTime;
  int? lastPayMillisecond;
  List<OrderItemModel>? orderItemList;

  OrderModel(
      {this.id,
        this.orderSn,
        this.paymentSn,
        this.unionOrderSn,
        this.shopId,
        this.shopName,
        this.orderStatus,
        this.orderStatusDesc,
        this.actualAmount,
        this.cancelTime,
        this.userRemark,
        this.createTime,
        this.lastPayMillisecond,
        this.orderItemList
      }
  );

  OrderModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    orderSn = json['orderSn'];
    paymentSn = json['paymentSn'];
    unionOrderSn = json['unionOrderSn'];
    shopId = json['shopId'];
    shopName = json['shopName'];
    orderStatus = json['orderStatus'];
    orderStatusDesc = json['orderStatusDesc'];
    actualAmount = json['actualAmount'];
    cancelTime = json['cancelTime'];
    userRemark = json['userRemark'];
    createTime = json['createTime'];
    lastPayMillisecond = json['lastPayMillisecond'];
    orderItemList = json['orderItemList'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['orderSn'] = this.orderSn;
    data['paymentSn'] = this.paymentSn;
    data['unionOrderSn'] = this.unionOrderSn;
    data['shopId'] = this.shopId;
    data['shopName'] = this.shopName;
    data['orderStatus'] = this.orderStatus;
    data['orderStatusDesc'] = this.orderStatusDesc;
    data['actualAmount'] = this.actualAmount;
    data['cancelTime'] = this.cancelTime;
    data['userRemark'] = this.userRemark;
    data['createTime'] = this.createTime;
    data['lastPayMillisecond'] = this.lastPayMillisecond;
    data['orderItemList'] = this.orderItemList;
    return data;
  }
}

class OrderItemModel {
  int? id;
  String? skuName;
  double? unitPrice;
  int? goodsNum;
  double? goodsAmount;
}

class OrderListModel {
  List<OrderModel>? records;
  int? current;
  bool? hasNext;

  OrderListModel.fromJson(Map<String, dynamic> json) {
    if (json['records'] != null) {
      records = <OrderModel>[];
      json['records'].forEach((v) {
        records!.add(OrderModel.fromJson(v));
      });
    }
    current = json['current'];
    hasNext = json['hasNext'];
  }
}